﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VsRtl_CSharp.Delegate
{
    public delegate int TheSQ(int value);

    public class VsRtl_DelegateParam
    {
        public void DoSomething(TheSQ method)
        {
            int value = method(10);
        }

        public int SqMethod(int x)
        {
            return x * x;
        }

        public int AnyMethod(int y)
        {
            return y * y * y;
        }
        /*
         static void Main(string[] args)
        {
            VsRtl_DelegateParam d = new VsRtl_DelegateParam();
            TheSQ sq;
            sq = d.SqMethod;
            d.DoSomething(sq);
            sq = d.AnyMethod;
            d.DoSomething(sq);
        }
         */
    }
}
